<%@page import="com.ym.b2b.cache.configcache.WebAppConfig"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="b" uri="/b2b-tags"%>
<style>
/*轮换大区域*/
.lunhuan{width:1190px;height:420px;position:relative;margin: 0 auto;}
.lunhuan #lunhuanback{width:100%;height:420px;position:absolute;left:0px;top:0px;overflow:hidden;}
.lunhuan #lunhuanback p{width:100%;height:420px;position:absolute;left:255px;top:0px;opacity:0;filter:alpha(opacity=0);background-repeat:no-repeat;background-position:50% 0px;}
.lunhuan #lunhuanback p img{width: 940px;height: 420px;}

.lunhuan .lunhuan_main{width:1190px;height:420px;margin:0 auto;position:relative;}
/*左侧所有商品列表*/
.suoyouliebiao{width:239px;position:absolute;left:0px;top:0px;border-left:1px solid #E6E6E6;border-bottom:1px solid #E6E6E6;z-index:200;box-shadow:5px 5px 5px rgba(0, 0, 0, 0.2);}
/*轮换中间区域*/
.lunhuancenter{width:757px;height:420px;position:absolute;left:240px;top:0px;}
.lunhuancenter .centergif{display:block;width:760px;height:420px;position:absolute;left:0px;top:0px;z-index:4;}
.lunhuancenter b{position:absolute;left:0px;top:-40px;opacity:0;filter:alpha(opacity=0);z-index:3;width:760px;height:210px;display:block;}
#lunbonum{height:14px;line-height:23px;position:absolute;left:19px;top:393px;z-index:5;}
#lunbonum li{width:14px;height:14px;float:left;margin-right:9px;background:#B4B4B4;border-radius:14px;cursor:pointer;}
#lunbonum .lunboone{background:#C80002;cursor:pointer;}
div.vertial_box { float: left; width: 196px; height: 288px; position: relative; }
</style>


<script type="text/javascript">
$(document).ready(function(){
    var ali=$('#lunbonum li');
    var aPage=$('#lunhuanback p');
    var aslide_img=$('.lunhuancenter b');
    var iNow=0;
    ali.each(function(index){	
        $(this).mouseover(function(){
            slide(index);
        })
    });
    function slide(index){	
        iNow=index;
        ali.eq(index).addClass('lunboone').siblings().removeClass();
		aPage.eq(index).siblings().stop().animate({opacity:0},600);
		aPage.eq(index).stop().animate({opacity:1},600);	
        aslide_img.eq(index).stop().animate({opacity:1,top:-10},600).siblings('b').stop().animate({opacity:0,top:-40},600);
    }
	
	function autoRun(){	
        iNow++;
		if(iNow==ali.length){
			iNow=0;
		}
		slide(iNow);
	}
	
	var timer=setInterval(autoRun,4000);
		
    ali.hover(function(){
		clearInterval(timer);
	},function(){
		timer=setInterval(autoRun,4000);
    });
})
</script>
<!-- 轮换图开始 -->
<div class="lunhuan">
    <div id="lunhuanback">
 		<b:getKey outResponseAttrName="ad" key="AD_1,AD_2" />
     
        <p style="opacity: 1;filter:alpha(opacity=100);">
        	<img src="${ad.AD_1.value }"   />
        </p>
        <p>
        	<img src="${ad.AD_2.value }"   />
        </p>
    </div>
    <div class="lunhuan_main">
        <!-- 轮换中间区域 -->
        <div class="lunhuancenter">
             <a href="javascript:void(0)" class='centergif'></a>
            <b class='slideUp' style="background-image:url('');opacity:1;filter:alpha(opacity=100);top:-10px;"></b>
            <b></b>
            <b class='slideUp' style="background-image:url('')"></b>
            
            <!-- 轮播的页码  开始 -->
            <ul id='lunbonum'>
                <li class='lunboone'></li>
                <li></li>
            </ul>
            <!-- 轮播的页码  结束 -->
        </div>
        <!-- 轮换中间区域结束 -->
    </div>
</div>
<!-- 轮换图结束 -->

	
	
	
	
<div class="mianbox">	
  
	<!-- 推荐  开始 -->
	<div class="retui_list fl mt11">
		<b:showProduct limitRow="6" isTop="1"  outResponseAttrName="pRet"/><!-- 获取首页推荐 -->
		<ul>
			<c:forEach items="${pRet.rows }" var="p1"  >
			<li>
				<div class="img fl">
					<a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}">
						<img src="<%=WebAppConfig.getPicPath() %>${p1.middlePic }" class="lazy">
					</a>
				</div>
				<div class="touming fl">
					<h2><a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}">${p1.productName }</a></h2>
					<div class="jiange fl">
						<span class="fb" style="color:#c90b05;">${p1.viewPrice }</span>
						<span>/</span>
						<span style=" text-decoration:line-through; color:#666666">￥${p1.retailPrice }</span>
					</div>
				</div>
			</li>
			</c:forEach>
		</ul>
	</div>
	<!-- 推荐  结束 -->
	<div class="tz_gg fr mt11">
		<b:showNews outResponseAttrName="newRet" limitRow="6" newsTypeName="通知公告" getType="list" />
		<h2>通知公告</h2>
		<ul>
			<c:forEach items="${newRet.rows }" var="news">
				<li><span>[公告]</span><a title="${news.newsTitle }" href="<c:url value="/news/showNewsDetail.s" />?newsId=${news.newsId}" target="_blank">${news.newsTitle }</a></li>
			</c:forEach>
		</ul>
	</div>
	
	 
	 <!-- 1F 推荐品种 开始 -->
	<b:showProduct limitRow="6" isCommend="1"  outResponseAttrName="pp2"/>
	<div class="ceng_3f fl mt14" id="1f">
		<div class="top fl">
			<div class="f fl fb">1F</div><h2>推荐品种</h2>
			<ul id="dpc">
				<li class="dq">新品推荐</li>
			</ul>
		</div>	
		<div class="ceng_3f_list fl" >
			<div class="vertial_box">
                   <img data-original="http://www.zjhpyy.com/img/advert/201501/591216f7-c8e7-4228-9096-56a9d53db8ac.jpg" alt="排毒养颜胶囊" class="lazy" width="196" height="298" src="http://www.zjhpyy.com/img/advert/201501/50c85d17-32f7-4756-97b6-a4b8b4c42bc5.jpg" style="display: inline-block;">
			</div>
			<ul>
			<c:forEach items="${pp2.rows }" var="p2"  >
				<li>
					<div class="img fl">
						<a href="<c:url value="/product/showProductDetail.s" />?productCode=${p2.productCode}" target="_blank">
							<img src="<%=WebAppConfig.getPicPath() %>${p2.middlePic }"  width="176" height="176" class="lazy">
						</a>
					</div>
					<div class="name fl"><a href="<c:url value="/product/showProductDetail.s" />?productCode=${p2.productCode}" target="_blank">${p2.productName }</a></div>
					<div class="bottom fl">
						<span class="fl yuanjia">￥${p2.retailPrice }</span>
						<span class="fl xianjia fb">${p2.viewPrice }</span>
					</div>
				</li>
			</c:forEach>
			</ul>	
		</div>
	</div>	
	<!-- 1F 推荐品种 结束 -->

	<!--2F优惠促销开始 -->
	<b:showProduct limitRow="7"  isComment="1"  outResponseAttrName="promoRet"/>
	<div class="ceng_3f fl mt14" id="1f">
		<div class="top fl">
			<div class="f fl fb">2F</div><h2>热评品种</h2>
			<ul id="dpc">
				<li class="dq">最新热评</li>
			</ul>
		</div>	
		<div class="ceng_3f_list f2" >
			<ul>
				<c:forEach items="${promoRet.rows }" var="p1" >
				<li>
					<div class="img fl">
						<a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}" target="_blank">
							<img src="<%=WebAppConfig.getPicPath() %>${p1.middlePic }"  width="176" height="176" class="lazy">
						</a>
					</div>
					<div class="name fl"><a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}" target="_blank">${p1.productName }</a></div>
					
					<div class="bottom fl">
						<span class="fl">零售价:${p1.retailPrice }</span>
						<c:if test="${not empty sessionScope.WEB_USER_TOKEN}">
							<span class="fr">销售价:${p1.viewPrice }</span>
						</c:if>
						<c:if test="${empty sessionScope.WEB_USER_TOKEN}">
							<span class="fr">登录可见</span>
						</c:if>
					</div>
				</li>
			</c:forEach>	
			</ul>
		</div>
	</div>
	<!--2F优惠促销结束   <div class="houdong fl">PURPOSE ${p1.purpose }</div>-->
<!-- 	<div class="ad_2f fl mt14">
		<a class="fl" href="#"><img src="resources/images/index/ad2.jpg"></a>
		<a class="fr" href="#"><img src="resources/images/index/ad3.jpg"></a>
	</div> -->
	<!--3F新品上市开始-->
	<div class="ceng_3f fl mt14" id="3f">
		<div class="top fl">
			<div class="f fl fb">3F</div><h2>新品上市</h2>
			<ul id="xpss">
				<li class="dq">上周新品</li>
			</ul>
			<a style=" float:right; margin:7px 17px 0 0; display:inline; " href="<c:url value="/product/searchProduct.s" />" target="_blank"><img src="resources/images/common/gd_bj.jpg"></a>
		</div>
		<div class="ceng_3f_list fl" id="3f">
			<b:showProduct limitRow="7" isNew="1"  outResponseAttrName="newP"/>
			<ul>
			<c:forEach items="${newP.rows }" var="p1" >
				<li>
					<div class="img fl">
						<a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}">
								<img src="<%=WebAppConfig.getPicPath() %>${p1.middlePic }"  width="176" height="176" class="lazy">
						</a>
					</div>
					<div class="name fl"><a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}">${p1.productName }</a></div>
					<div class="bottom fl">
						<span class="fl yuanjia">￥${p1.retailPrice }</span>
						<span class="fl xianjia fb">${p1.viewPrice }</span>
					</div>
				</li>
			</c:forEach>
			</ul>	
		</div>
	</div>	
	<!--3F新品上市结束-->
	<!--4F商品排行榜结束 
	<div class="ceng_4f fl mt14">
		<div class="top fl">
			<div class="changt "></div>
			<div class="f fl fb">4F</div><h2>商品排行榜</h2>
			<div class="dianji fr"><a href="<c:url value="/product/searchProduct.s" />">点击查看更多排行榜</a><i></i></div>
		</div>
		<div class="ceng_4f_list fl">
			<div class="paihang_list fl">
				<div class="list_name fl fb">人气访问排行榜</div>
				<div class="top_10 fl ">TOP10</div>
				<div class="gd fl"><a href="<c:url value="/product/searchProduct.s" />" target="_blank">更多</a><i></i></div>
				<ul>
				<c:forEach items="${result.data.productList }" var="p1" begin="1" end="11" varStatus="varstatus">
					<li><p>${varstatus.index }</p><a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}">${p1.productName }</a></li>
				</c:forEach>
				</ul>
			</div>
			<div class="paihang_list fl">
				<div class="list_name fl fb">周销量排行榜</div>
				<div class="top_10 fl ">TOP10</div>
				<div class="gd fl"><a href="<c:url value="/product/searchProduct.s" />" target="_blank">更多</a><i></i></div>
				<ul>
					<c:forEach items="${result.data.productList }" var="p1" begin="11" end="21" varStatus="varstatus">
					<li><p>${varstatus.index }</p><a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}">${p1.productName }</a></li>
				</c:forEach>
				</ul>
			</div>
			<div class="paihang_list fl">
				<div class="list_name fl fb">月销量排行榜</div>
				<div class="top_10 fl ">TOP10</div>
				<div class="gd fl"><a href="<c:url value="/product/searchProduct.s" />" target="_blank">更多</a><i></i></div>
				<ul>
					<c:forEach items="${result.data.productList }" var="p1" begin="21" end="31" varStatus="varstatus">
					<li><p>${varstatus.index }</p><a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}">${p1.productName }</a></li>
				</c:forEach>
				</ul>
			</div>
			<div class="paihang_list fl" style="border:0;">
				<div class="list_name fl fb" style="width:155px;">月销量增幅排行榜</div>
				<div class="top_10 fl " style="text-align:center;">TOP10</div>
				<div class="gd fl"><a href="<c:url value="/product/searchProduct.s" />" target="_blank">更多</a><i></i></div>
				<ul>
				<c:forEach items="${result.data.productList }" var="p1" begin="31" end="41" varStatus="varstatus">
					<li><p>${varstatus.index }</p><a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}">${p1.productName }</a></li>
				</c:forEach>
				</ul>
			</div>
		</div>
	</div>		
	 4F商品排行榜结束-->
<!-- 	<div class="ad_2f mt14 fl"><img src="resources/images/index/ad34.jpg"></div> -->
 
	<div class="news_list fl mt14">
		<div class="left fl">
			<div class="news_list_top fl">
				<ul>
					<li class="dq">法律法规</li>
					<li>通知公告</li>
				</ul>
			</div>
			<div class="left_list fl">
				<b:showNews outResponseAttrName="fagui" limitRow="9" newsTypeName="法律法规" getType="list" />
				<ul>
					<c:forEach items="${fagui.rows }" var="p">
						<li><a href="<c:url value="/news/showNewsDetail.s" />?newsId=${p.newsId}" target="_blank" title="${p.newsTitle }">${p.newsTitle }</a><span>${p.publishDate }</span></li>
					</c:forEach>
				</ul>
				<b:showNews outResponseAttrName="tongzhi" limitRow="9" newsTypeName="通知公告" getType="list"/>
				<ul style="display: none;">
					<c:forEach items="${tongzhi.rows }" var="p">
						<li><a href="<c:url value="/news/showNewsDetail.s" />?newsId=${p.newsId}" target="_blank" title="${p.newsTitle }">${p.newsTitle }</a><span>${p.publishDate }</span></li>
					</c:forEach>
				</ul>
			</div>
		</div>
		<div class="right fr">
			<div class="news_list_top2 fl">
				<ul>
					<li class="dq">公司动态</li>
					<li>行业资讯</li>
				</ul>
			</div>
			<div class="right_list fl">
				<b:showNews outResponseAttrName="gsdt" limitRow="9" newsTypeName="公司动态" getType="list"/>
				<ul >
					<c:forEach items="${gsdt.rows }" var="p">
						<li><a href="<c:url value="/news/showNewsDetail.s" />?newsId=${p.newsId}" target="_blank" title="${p.newsTitle }">${p.newsTitle }</a><span>${p.publishDate }</span></li>
					</c:forEach>
				</ul>
				<b:showNews outResponseAttrName="hyzx" limitRow="9" newsTypeName="行业资讯" getType="list"/>
				<ul style="display: none;">
					<c:forEach items="${hyzx.rows }" var="p">
						<li><a href="<c:url value="/news/showNewsDetail.s" />?newsId=${p.newsId}" target="_blank" title="${p.newsTitle }">${p.newsTitle }</a><span>${p.publishDate }</span></li>
					</c:forEach>
				</ul>
			</div>
		</div>
	</div>
	
</div>

<div class=" mianbox">
	<div class="zzsm fl mt14">
		<img class="fl" src="<c:url value="/resources/images/index/zzsm_bj.jpg" />">
		<p>由于本公司经营方式为批发,根据药品经营管理法律法规,只允许与具有合法药品生产或药品经营资格的单位进行交易。为了确保交易的合法性，保证会员信息的唯一性和真实性，我们将不提供网上注册。同时,个人消费者将不能从"宣城医药在线"直接购买药品(包括医疗器械)。如果贵单位具有药品经营资质，愿意成为"宣城医药在线"的注册会员，请拨打以下号码，我们的客服人员将在第一时间联系。不便之处敬请谅解，谢谢！</p>
	</div>
</div>
